import React, { useState } from 'react';
function Button({ name }) {

    console.log(name)
    function changeName(name) {

      return name + '改变name的方法'
    }
  
    const otherName =  changeName(name)
    return (
        <div>
          <div>{otherName}</div>
          <div>{}</div>
        </div>
    )
  }
export default function Example9() {
    const [name, setName] = useState('名称')
    const [content,setContent] = useState('内容')
    return(
        <>
        <button onClick={() => setName(new Date().getTime()+'aaa')}>name</button>
        <button onClick={() => setContent(new Date().getTime()+'bbb')}>content</button>
        <Button name={name}></Button>
        </>
    )
}